<template>
  <div :class="prefixCls">
    <Alert banner v-bind="$attrs">
      <template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
        <slot :name="item" v-bind="data || {}"></slot>
      </template>
    </Alert>
  </div>
</template>

<script lang="ts" setup>
  import { useDesign } from "/@/hooks/web/useDesign"
  import { Alert } from "ant-design-vue"
  import { ref, useAttrs } from "vue"
  const attrs = useAttrs()
  const { prefixCls } = useDesign("alert")
</script>

<style lang="less">
  @prefix-cls: ~"@{namespace}-alert";
  .@{prefix-cls} {
    margin: 0px 0px 10px 0px;
    background-color: @component-background;
    padding: 5px;
    border-radius: @border-radius-base;

    .ant-alert {
      border-radius: @border-radius-base;
    }
  }
</style>
